

// 登录
var login = new Vue({
	el: "#log-sub",
	methods: {
		back: function(){
			$('#username').val("");
			$('#log-pass').val("");
			$('.prompt').text("");
		},
		submit: function(){
			console.log('账号：' + $('#username').val());
			console.log('密码：' + $('#log-pass').val());
			$('#log-sub>button:last-child').attr("data-dismiss","modal");
		}
	}
});
// 注册
var register = new Vue({
	el: "#reg-sub",
	methods: {
		back: function(){
			$('#phone').val("");
			$('#reg-pass').val("");
			$('#reg-password').val("");
			$('.prompt').text("");
		},
		submit: function(){
			if($('#reg-pass').val() !== $('#reg-password').val()){
				console.log('密码不一致');
				$("#reg-password+span").text("密码不一致");
			}else{
				console.log('账号：' + $('#phone').val());
				console.log('密码：' + $('#reg-pass').val());
				console.log('密码：' + $('#reg-password').val());
				$('#reg-sub>button:last-child').attr("data-dismiss","modal");
			}
		}
	}
})